/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved.
 * Description: remote rdma rma buff interface
 */

#ifndef REMOTE_RDMA_RMA_BUFFER_H
#define REMOTE_RDMA_RMA_BUFFER_H

#include <memory>
#include <string>
#include "hccl_common.h"
#include "hccl_network_pub.h"
#include "rma_buffer.h"

namespace hccl {
class RemoteRdmaRmaBufferImpl;

class RemoteRdmaRmaBuffer : public RmaBuffer {
public:
    RemoteRdmaRmaBuffer();
    HcclResult Deserialize(const std::string&);
    ~RemoteRdmaRmaBuffer() override;

    RemoteRdmaRmaBuffer(const RemoteRdmaRmaBuffer &that) = delete;
    RemoteRdmaRmaBuffer &operator=(const RemoteRdmaRmaBuffer &that) = delete;

    // Deserialize成功后调用获取属性接口
    u32 GetKey() const;

private:
    std::unique_ptr<RemoteRdmaRmaBufferImpl> pimpl_;
};
}
#endif //  REMOTE_RDMA_RMA_BUFFER_H